import 'package:flutter/material.dart';

class BasicListApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    final String appTitle = 'Basic List Demo';
    return MaterialApp(
      title: appTitle,
      theme: ThemeData(primarySwatch: Colors.red),
      home: BasicListAppPage(title: appTitle),
    );
  }
}

class BasicListAppPage extends StatefulWidget {
  final String title;

  BasicListAppPage({Key key, this.title}) : super(key: key);

  @override
  State<StatefulWidget> createState() => BasicListAppPageState();
}

class BasicListAppPageState extends State<BasicListAppPage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: ListView(
        children: <Widget>[
          ListTile(
            leading: Icon(Icons.map),
            title: Text('Map'),
          ),
          ListTile(
            leading: Icon(Icons.photo_album),
            title: Text('Album'),
          ),
          ListTile(
            leading: Icon(Icons.phone),
            title: Text('Phone'),
          ),
        ],
      ),
    );
  }
}
